<?php 

namespace app\common\validate\salary;

use think\Validate;

class SalaryDetail extends Validate 
{ 
    protected $rule = [
        'salary_main_id' => 'require',
        'customer_id' => 'require',
        'year_month' => 'require',
    ];

    protected $message = [
        'salary_main_id.require' => '请输入薪资记录ID',
        'customer_id.require' => '请输入用户ID',
        'year_month.require' => '请输入年/月份',
    ];

    protected $scene = [
        'edit' => ['salary_main_id','customer_id','absence_duty_num','late_num','leave_early_num','year_month','remark','overtime_price','overtime_num','absence_duty_price','late_price','leave_early_price','admin_name','id'],
        'add' => ['salary_main_id','customer_id','absence_duty_num','late_num','leave_early_num','year_month','remark','overtime_price','overtime_num','absence_duty_price','late_price','leave_early_price','admin_name'],
    ];

} 
